﻿Public Class frmMonthYearPicker
    ' Months in Khmer
    Dim months As String() = {"មករា", "កុម្ភះ", "មិនា", "មេសា", "ឧសភា", "មិថុនា", "កញ្ញា", "សីហា", "កក្កដា", "តុលា", "វិច្ឆិកា", "ធ្នូ"}

    Public Function getKHMonth(ByVal m As Integer)
        Return months(m)
    End Function

    Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
        Main.Show()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.Hide()
        frmRoomSelecting.Show()
    End Sub

    Private Sub frmMonthYearPicker_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        uxMonthcbb.Text = months(Now().Month - 1)
        uxYearcbb.Text = Year(Now())
    End Sub

    Public Function getCurrentKhmerMonth() As String
        Return months(Now().Month - 1) & " " & Year(Now())
    End Function

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        MsgBox(uxMonthcbb.SelectedIndex)
    End Sub
End Class